package cuid.sc20.laboratory.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import cuid.sc20.laboratory.annotation.Excel;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;


/**
 * 用户对象 tb_user
 *
 * @author ruoyi
 * @date 2023-06-30
 */
public class TbUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户主键 */
    private Long id;

    /** 用户昵称 */
    @Excel(name = "用户昵称")
    private String nickName;

    /** 登录用户名 */
    @Excel(name = "登录用户名")
    private String userName;

    /** 头像url */
    @Excel(name = "头像url")
    private String avatar;

    /** 手机号 */
    @Excel(name = "手机号")
    private String cellPhone;

    /** 密码 */
    @Excel(name = "密码")
    private String passwd;

    /** 密码加密盐 */
    @Excel(name = "密码加密盐")
    private String salt;

    /** 靶场积分 */
    @Excel(name = "靶场积分")
    private Long targetCredit;

    /** ctf练习积分 */
    @Excel(name = "ctf练习积分")
    private Long ctfCredit;

    /** 用户是否有效 0-无效 1-有效 */
    @Excel(name = "用户是否有效 0-无效 1-有效")
    private Long status;

    /** 用户类型1-内部用户 2-外部用户 */
    @Excel(name = "用户类型1-内部用户 2-外部用户")
    private Long userType;

    /** 用户所在的省 */
    @Excel(name = "用户所在的省")
    private Long province;

    /** 用户所在城市 */
    @Excel(name = "用户所在城市")
    private Long city;

    /** 用户所在的区或县 */
    @Excel(name = "用户所在的区或县")
    private Long county;

    /** 用户生日 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "用户生日", width = 30, dateFormat = "yyyy-MM-dd")
    private Date dob;

    /** 邮箱地址 */
    @Excel(name = "邮箱地址")
    private String email;

    /** 性别 1-男 0-女 */
    @Excel(name = "性别 1-男 0-女")
    private Long sex;

    /** 第三方登录的openid */
    @Excel(name = "第三方登录的openid")
    private String openid;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date ctime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date utime;

    /** 积分 */
    @Excel(name = "积分")
    private Long score;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setNickName(String nickName)
    {
        this.nickName = nickName;
    }

    public String getNickName()
    {
        return nickName;
    }
    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getUserName()
    {
        return userName;
    }
    public void setAvatar(String avatar)
    {
        this.avatar = avatar;
    }

    public String getAvatar()
    {
        return avatar;
    }
    public void setCellPhone(String cellPhone)
    {
        this.cellPhone = cellPhone;
    }

    public String getCellPhone()
    {
        return cellPhone;
    }
    public void setPasswd(String passwd)
    {
        this.passwd = passwd;
    }

    public String getPasswd()
    {
        return passwd;
    }
    public void setSalt(String salt)
    {
        this.salt = salt;
    }

    public String getSalt()
    {
        return salt;
    }
    public void setTargetCredit(Long targetCredit)
    {
        this.targetCredit = targetCredit;
    }

    public Long getTargetCredit()
    {
        return targetCredit;
    }
    public void setCtfCredit(Long ctfCredit)
    {
        this.ctfCredit = ctfCredit;
    }

    public Long getCtfCredit()
    {
        return ctfCredit;
    }
    public void setStatus(Long status)
    {
        this.status = status;
    }

    public Long getStatus()
    {
        return status;
    }
    public void setUserType(Long userType)
    {
        this.userType = userType;
    }

    public Long getUserType()
    {
        return userType;
    }
    public void setProvince(Long province)
    {
        this.province = province;
    }

    public Long getProvince()
    {
        return province;
    }
    public void setCity(Long city)
    {
        this.city = city;
    }

    public Long getCity()
    {
        return city;
    }
    public void setCounty(Long county)
    {
        this.county = county;
    }

    public Long getCounty()
    {
        return county;
    }
    public void setDob(Date dob)
    {
        this.dob = dob;
    }

    public Date getDob()
    {
        return dob;
    }
    public void setEmail(String email)
    {
        this.email = email;
    }

    public String getEmail()
    {
        return email;
    }
    public void setSex(Long sex)
    {
        this.sex = sex;
    }

    public Long getSex()
    {
        return sex;
    }
    public void setOpenid(String openid)
    {
        this.openid = openid;
    }

    public String getOpenid()
    {
        return openid;
    }
    public void setCtime(Date ctime)
    {
        this.ctime = ctime;
    }

    public Date getCtime()
    {
        return ctime;
    }
    public void setUtime(Date utime)
    {
        this.utime = utime;
    }

    public Date getUtime()
    {
        return utime;
    }
    public void setScore(Long score)
    {
        this.score = score;
    }

    public Long getScore()
    {
        return score;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("nickName", getNickName())
            .append("userName", getUserName())
            .append("avatar", getAvatar())
            .append("cellPhone", getCellPhone())
            .append("passwd", getPasswd())
            .append("salt", getSalt())
            .append("targetCredit", getTargetCredit())
            .append("ctfCredit", getCtfCredit())
            .append("status", getStatus())
            .append("userType", getUserType())
            .append("province", getProvince())
            .append("city", getCity())
            .append("county", getCounty())
            .append("dob", getDob())
            .append("email", getEmail())
            .append("sex", getSex())
            .append("openid", getOpenid())
            .append("ctime", getCtime())
            .append("utime", getUtime())
            .append("score", getScore())
            .toString();
    }
}
